Question : TypeError: ShallowWrapper::state requires that `state` not be `null` or `undefined`
Answered by : cassiano
class MyComponent extends React.Component { constructor(props) { super(props); this.state = {/* initial state */} }
}
Source : https://stackoverflow.com/questions/54656609/typeerror-shallowwrapperstateisopen-requires-that-state-not-be-null-o | Last Update : Sun, 08 Mar 20